import { _decorator, Component, Node, Vec3 } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('DeathTrigger')
export class DeathTrigger extends Component {
    @property(Node) playerCamera:Node = null;
    private _pos: Vec3;
    start() {
        this._pos = new Vec3();
    }

    update(deltaTime: number) {
        this.playerCamera.getPosition(this._pos);
        this._pos.z = 0;
        this._pos.y = -1180;
        this.node.setPosition(this._pos);
    }
}


